<?php

/*
*###########################################################################################################################*
#															    															#
#															    															#
#    **  ** ****** ** **  **  ****** ** ***   ** ***   ****** ** **  **  ** **  ** ** **  **    ****   ** **  **  ******    #
#    **  ** ****** ********** ****** *******  *******  ****** ********** ** **  ** **********  ******  ********** ******    #
#    **  ** **  ** **  **  ** **     ***   ** **    ** **     **  **  **    **  ** **  **  ** ***   ** **  **  ** **        #
#    ****** **  ** **  **  ** ****** **   *** **   *** ****** **  **  ** ** **  ** **  **  ** **       **  **  ** ******    #
#    ****** **  ** **  **  ** ****** *******  *******  ****** **  **  ** ** **  ** **  **  ** **       **  **  ** ******    #
#    **  ** **  ** **  **  ** **     *****    ******   **     **  **  ** ** **  ** **  **  ** ***   ** **  **  **     **    #
#    **  ** ****** **  **  ** ****** **       **  ***  ****** **  **  ** ** ****** **  **  **  ******  **  **  ** ******    #
#    **  ** ****** **  **  ** ****** **       **   *** ****** **  **  ** **  ** ** **  **  **   ****   **  **  ** ******    #
#															    															#
#															    															#
#															    															#
#    2010 - 2011 © HomePremiumCMS made by HomePemium as PremiumEye & Security by HomePremium and Merijnz		    		#
#															    															#
#    Powered by PhoenixPHP 3.7.1 (build 138000)										    									#
#															    															#
#															    															#
#															    															#
*###########################################################################################################################*
*/

define('USERNAME_REQUIRED', TRUE);
define('ACCOUNT_REQUIRED', TRUE);
include('global.php');
define("THIS_SCRIPT", 'me');
$username = $core->EscapeString($_SESSION['username']);
$email = $core->EscapeString($_SESSION['account']);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>

	<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    
	<title><?php echo $core->EscapeString($users->UserInfo($username, 'username'))." - Me"; ?></title>

</head> 

 
<body> 
 
<?php include("system/header_home.php"); ?>
	
<div class="mainBox">
	
	<?php include("system/homenav.php"); ?>

	<div class="mid" id="midcontent"> 
    
    	<div style="width: 758px; margin-left: 1px; float: left;">

    		<div class="myOverview">
					
				<img align="left" src="http://www.habbo.com/habbo-imaging/avatarimage?figure=<?php echo $users->UserInfo($username, 'look'); ?>&direction=3&head_direction=3&gesture=sml" alt="<?php echo $users->UserInfo($username, 'username'); ?>" style="margin:10px 50px 0 30px;" />
                
				<div style="font-size: 11px; color: white;">
            
            		<div style="height: 12px; width: 200px;"></div>
            
					<div style="padding-left: 10px;">
                    
                    	<b><?php echo $lang['me_user_info_name']; ?>:</b><br /><?php echo $core->EscapeString($users->UserInfo($username, 'username')); ?>
                        
                    </div>
                
					<div style="padding-top: 18px;">
                    
                    	<b><?php echo $lang['me_user_info_motto']; ?>:</b><br /><?php echo html_entity_decode($core->EscapeString($users->UserInfo($username, 'motto'))); ?>
                        
                    </div>

					<div style="padding-top: 12px;">
                    
                    	<b><?php echo $lang['me_user_info_last_online']; ?>:</b><br /><?php echo @date("d-m-Y", $users->UserInfo($username, 'last_online')); ?> <?php echo $lang['me_user_info_last_online_on']; ?> <?php echo @date("H:i", $users->UserInfo($username, 'last_online')); ?>
                        
                    </div>
			
					<div id="wide-personal-info" style="float: right;">
                    
            			<?php if($hotel == 'open'){ ?>
                        
							<div class="open enter-btn">
                            
								<a href="/client" target="ClientWndw" onclick="window.open('client/','ClientWndw','width=980,height=597');return false;"><?php echo $lang['enter_hotel']; ?><i></i></a>
                                
								<b></b>
                                
							</div>
                            
                    	<?php }else{ ?>
                        
							<div class="closed enter-btn">
                            
								<a><?php echo $lang['enter_hotel']; ?><i></i></a>
                                
								<b></b>
                                
							</div>
                            
                    	<?php } ?>
                        
						</div>
                        
        			</div>
                    
				</div>
                
				<?php include("system/grand_news_widget.php"); ?>

       			</div>

    		<div class="column" id="column1">
    
				<div style="border: 2px solid #3C3E3F;background-color:#4A4D4F;padding:10px 10px 13px 10px;border-radius:4px;margin-bottom:10px;">
                
					<div style="width:500px;">
                    
						<font style="border: 2px solid #D19E25;background-color:#98721A;padding:3px;border-radius:3px;color:#FFFFFF;text-shadow: 1px 1px #000000;font-size:14px;font-weight:bold; font:Tahoma, Geneva, sans-serif;margin-right: 10px;">
                        
							<?php echo $core->EscapeString($users->UserInfo($username, 'credits')); ?><img style="margin-bottom:-4px;margin-left: 4px;margin-right: -5px;" src="Public/Styles/Default/Images/icons/coin.png" />
						
                        </font>
                        
						<font style="border: 2px solid #AAC5D6;background-color:#7C8E97;padding:3px;border-radius:3px;color:#FFFFFF;text-shadow: 1px 1px #000000;font-size:14px;font-weight:bold; font:Tahoma, Geneva, sans-serif;margin-right: 10px;">
                        
							<?php echo $core->EscapeString($users->UserInfo($username, 'activity_points')); ?><img style="margin-bottom:-6px;margin-left: 4px;" src="Public/Styles/Default/Images/icons/pixel.png" />

						</font>
						<font style="border: 2px solid #53CC53;background-color:#558255;padding:3px;border-radius:3px;color:#FFFFFF;text-shadow: 1px 1px #000000;font-size:14px;font-weight:bold; font:Tahoma, Geneva, sans-serif;margin-right: 10px;">
                        
							<?php echo $core->EscapeString($users->UserInfo($username, 'belcredits')); ?><img style="margin-bottom:-4px;margin-left: 4px;" src="Public/Styles/Default/Images/icons/coin.png" />
						
                        </font>
                        
					</div>
                    
				</div>

				<div class="l_boxHeader_lightblue"><div class="titel"><?php echo $lang['my_players']; ?></div></div>

    				<div class="contentBox">

						<div style="max-height:300px;overflow:scroll;overflow-y:scroll;overflow-x:hidden;text-align:left;">
                        
							<?php
							$query = mysql_query("SELECT * FROM users WHERE mail = '".$email."' ORDER BY last_online DESC LIMIT 10");
							$color = 'odd';
							while($user = mysql_fetch_array($query))
								{
								echo '	
									<div class="campaigncontainer" id="'.$color.'">
									
										<table width="100%">
										
											<img style="margin-left: 9px;" align="left" src="http://www.habbo.com/habbo-imaging/avatarimage?figure='.$user["look"].'&size=s"/>
											
											<div class="avatar" id="avatar-selected" figure="'.$user["look"].'" alt="'.$user["username"].'" />
											
												<a href="functions/userlogin.php?name='.$user["username"].'">
													
													'.$lang['now_play'].'
													
												</a>
												
											</div>
											
											<div style="float: left;padding:14px 15px 0px 9px;">
											
												<div class="avatar-name">
												
													'.$user["username"].'
													
												</div>
												
												<div class="avatar-lastonline">
													
													'.$lang['me_user_info_last_online'].': '.@date("d-m-Y", $user["last_online"]).' '.$lang['me_user_info_last_online_on'].' '.@date("H:i", $user["last_online"]).'
													
												</div>
						
											</div>
						
										</table>
										
									</div>
									';
				
								if($color == 'odd')
								$color='even';
								else
								$color='odd';
								}
							?>
                            
						</div>
                        
						<div class="campaigncontainer" id="even" style="border-top: #B9B9B9 solid 2px;">
			
							<?php
							$query = mysql_query("SELECT * FROM users WHERE mail = '".$email."'");
							$userregister = mysql_fetch_array($query)
							?>     
               
            				<form id="Add_Avatar" method="post" action="system/add_user.php?make=user">
                            
								<input type="hidden" name="email" id="email" value="<?php echo $email; ?>" />
                                
								<input type="hidden" name="bdday" id="bdday" value="why" />
                                
								<input type="hidden" name="bdmonth" id="bdmonth" value="are" />
                                
								<input type="hidden" name="bdyear" id="bdyear" value="you" />
                                
                                <input type="hidden" name="date" id="date" value="<?php echo $core->EscapeString($users->UserInfo($username, 'date')); ?>" />
                                
								<input type="hidden" name="password" id="password" value="LookingHere" />
                                
								<div style="padding-top: 15px;">
                                    
                                    <div class="AddAvatar" onclick="Add_Avatar.submit();">
										
										<?php echo $lang['add_another_player']; ?> 
                                            
                                    </div>
                                    
                                    <font style="float: left; font-size: 13px; padding-left: 4px;">
									
										<?php echo $lang['to_my_account']; ?>
                                        
                                    </font>
                                    
                               	</div>
                                
            				</form>
            
            			</div>

    				</div>
                    
					<div class="l_boxBottom"></div>
                    
                    <?php echo $core->EscapeString($core->HeaderStyleJs()); ?>
    
					<div style="margin-top: 10px;" class="l_boxHeader_orange">
                    
                    	<div class="titel">
						
							<?php echo $lang['now_in']; ?> <?php echo $lang['hotel_name']; ?>
                            
                        </div>
                        
                    </div>
                    
    				<div class="contentBox">
						<?php 
						$query = mysql_query("SELECT * FROM cms_news WHERE campaign ='1' ORDER BY published DESC LIMIT 5");
						$num = mysql_num_rows($query);
						if($num > 0)
							{
							$color = 'odd';
							while($campaign = mysql_fetch_array($query))
								{
								echo' 
									<div class="campaigncontainer" id="'.$color.'">
									
										<div class="image" style="background: url('.$campaign['campaignimg'].') no-repeat;"></div>
										
										<div class="campaign">
										
											<div class="title">
											
												<a href="articles.php?story='.$campaign['id'].'">
												
													'.strip_tags($campaign['title']).'
													
												</a>
												
											</div>
											
											<div class="story">
											
												'.strip_tags($campaign['shortstory'], '<br><br/><br />').'
												
											</div>
											
											<div class="published">
											
												'.$lang['posted_date'].': '.@date("d-m-Y", $campaign['published']).'
												
											</div>
											
											<div style="float: right;" class="readmore">
											
												<a style="color: #399001; text-decoration: underline; font-size: 11px;" href="articles.php?story='.$campaign['id'].'">
												
													'.$lang['read_more'].'
													
												</a>
												
											</div>
											
										</div>
										
									</div>
									';
							if($color == 'odd')
							$color='even';
							else
							$color='odd';
							}
						}			
						?>
	
    				</div>
                    
					<div class="l_boxBottom"></div>
                    
                    <div style="margin-top: 10px;" class="l_boxHeader_green">
                
                	<div class="titel">
					
						<?php echo $lang['folow_twitter']; ?>
                        
                    </div>
                    
                </div>
                
    			<div class="contentBox">
                
    				<div class="boxContent">
                        
						<script>
						new TWTR.Widget({
						  version: 2,
						  type: 'profile',
						  rpp: 10,
						  interval: 30000,
						  width: 'auto',
						  height: 200,
						  theme: {
						    shell: {
						      background: '#4A4D4F',
						      color: 'white',
						    },
 						   tweets: {
 						     background: 'white',
 						     color: '#4A4D4F',
						      links: '#FE6301'
						    }
 						 },
						  features: {
 						   scrollbar: true,
						    loop: false,
						    live: false,
						    behavior: 'all'
						  }
						}).render().setUser('<?php echo $twitter ?>').start();
						</script>
                        
    				</div>
                    
    			</div>
                
    			<div class="l_boxBottom"></div>

				</div>

    		<div class="column" id="column2" style="text-align:left;">

				<?php include("system/news_widget.php") ?>
    
    			<div style="margin-top: 10px;" class="m_boxHeader_green_blue">
                
                	<div class="titel">
					
						<?php echo $lang['populair_rooms']; ?>
                        
                    </div>
                    
                </div>
                
    			<div class="m_contentBox">
                
    				<div class="boxContent">
                    
						<div style="max-height:280px;overflow:scroll;overflow-y:scroll;overflow-x:hidden;text-align:left;">
                        
							<?php
							$roomq = mysql_query("SELECT * FROM rooms WHERE users_now > 0 ORDER BY users_now DESC LIMIT 10");
							if(mysql_num_rows($roomq) == 0){
								echo $lang['no_people_rooms'].'';
							}
							$color = 'odd';
							while($room = mysql_fetch_array($roomq))
								{
							?>
								<div class="campaigncontainer" id="<?php echo $color ?>">
                                
									<div class="RoomsBox">
                                    
										<div class="RoomSearchResultsIcon" style="background-image:url(Public/Images/rooms/<?php if($room['roomtype'] == 'private')echo $room['model_name']; else echo 'public'; ?>.gif);"></div>
                                        
										<div class="Roomsname">
										
											<?php echo $room['caption']; ?>
                                            
                                        </div>
                                        
										<div class="Roomsinfo">
										
											<?php echo $lang['owner']; ?>: <?php if($room['roomtype'] == 'private')echo '<a href="home.php?u='.$room['owner'].'">'.$room['owner'].'</a>'; else echo 'N/A'; ?>
                                            
                                        </div>
                                        
                    					<div class="Roomsinfo">
										
											<?php echo $lang['room_visitors']; ?>: <?php echo $room['users_now']; ?>
                                            
                                        </div>
                                        
                    					<div class="Roomsinfo">
										
											<?php echo $lang['room_rating']; ?>: <?php echo $room['score']; ?>
                                            
                                        </div>
                                        
                    					<div class="Roomsinfo">
										
											<?php echo $lang['room_state']; ?>: <?php echo $room['state']; ?>
                                            
                                        </div>
                                        
									</div>
                                    
								</div>
                                
            				<?php
							if($color == 'odd')
							$color='even';
							else
							$color='odd';
							}
							?>
                            
						</div>
                        
					</div>
                    
    			</div>
                
    			<div class="m_boxBottom2"></div>
    
        		<div style="margin-top: 10px;" class="m_boxHeader_red">
                
                	<div class="titel">
					
						<?php echo $lang['top_5_credits']; ?>
                        
                    </div>
                    
                </div>
                
    			<div class="m_contentBox">
                
    				<div class="boxContent">
                    
                		<table width="100%">
					
                    		<?php
							$query = mysql_query("SELECT * FROM users ORDER BY credits DESC LIMIT 5");
							while($top5 = mysql_fetch_array($query))
								{
							?>
                            
								<tr>
                                
            						<td>
                                    
										<a href="home.php?u=<?php echo $top5['username']; ?>"><b><?php echo $top5['username']; ?></b></a> : <?php echo $top5['credits']; ?>
                                        
                					</td>
                                    
   								<tr>
                                
            				<?php }?>
                            
                 		</table>   
                        
                	</div>
                    
    			</div>
                
   			 	<div class="m_boxBottom2"></div>
                
                <div style="margin-top: 10px;" class="m_boxHeader_lightblue">
                
                	<div class="titel">
					
						<?php echo $lang['profile_badges']; ?>
                        
                    </div>
                    
                </div>
                
    			<div class="m_contentBox">
                
    				<div class="boxContent" style="display: table;width: 300px;">
                    
                    	<div style="margin-top: -10px;"></div>
					
                    		<?php
							$query = mysql_query("SELECT * FROM user_badges WHERE user_id = ".$core->EscapeString($users->UserInfo($username, 'id'))."");
							while($badges = mysql_fetch_array($query))
								{
							?>
                                
            						<div style="float: left;margin-left: 10px;margin-top: 10px;">
                                    
										<img align="left" src="Public/Images/badges/<?php echo $badges['badge_id']; ?>.gif" />
                                        
                					</div>
                                
            				<?php }?>
                        
                	</div>
                    
    			</div>
                
   			 	<div class="m_boxBottom2"></div>


			</div> 
        
		</div>

		<?php
		$query_display_flow_image = mysql_query("SELECT * FROM cms_news WHERE super_fader = 1");
		$row_news_flow_image = mysql_num_rows($query_display_flow_image);
		?>
        
		<div style=" <?php if ($row_news_flow_image == 0) { echo'margin-top: -140px;'; }else{ echo'margin-top: -450px;'; } ?> float: right; margin-right: 2px; width: 156px;">
        
			<?php include("system/sideads.php"); ?>
            
		</div>

	</div> 

	<?php include("system/footer.php"); ?>
    
</div>

</body> 
</html>
